/**
 * 2018年5月17日下午11:00:43
 */
package com.an.nopro.app.framework.schedulejob;

import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;

/**

 * @目的：报时任务.<br>
 * 
 * @author 86171
 * @date 2018年5月17日下午11:00:43
 * 
 */
@Component
public class TimeReport{ /*implements SchedulingConfigurer {

	private static final Logger log = LoggerFactory.getLogger(TimeReport.class);
	
	private String cron = "0/2 * * * * *?";
	@Override
	public void configureTasks(ScheduledTaskRegistrar arg0) {

		arg0.addTriggerTask(new Thread(new Runnable() {
			
			@Override
			public void run() {
				System.err.println("当前时间：" + new Date());
				log.debug("报时完成！！");
			}
		}), new CronTrigger(cron));
	}
	public void setCron(String cron) {
		this.cron = cron;
	}
*/
}
